import React,{Component} from 'react'

class Son extends Component{
	constructor(){
		super();
		this.state = {
			myName : "张三"
		}
	}
	componentWillMount(){
		
	}
	showName(){
		this.props.showMyName(this.state.myName);
	}
	render(){
		return (
			<div>
				{this.props.myName}
				<div>
					<button onClick={this.showName.bind(this)}>按钮</button>

				</div>
			</div>
		)
	}
}
export default Son